package m.member.order.model;

import m.common.model.FieldMeta;
import m.common.model.LinkTableMeta;
import m.common.model.Model;
import m.common.model.TableMeta;
import m.common.model.type.FieldType;
import m.member.manage.model.MemberInfo;
import manage.model.AdminLogin;
import manage.model.OrgGroupView;

import java.util.Date;

@TableMeta(name="to_order_info",description="订单信息表")
public class OrderInfo extends Model {
    @LinkTableMeta(name="member_oid",table= MemberInfo.class,description="会员信息")
    private MemberInfo member;

    @FieldMeta(name = "order_amount",type = FieldType.DOUBLE,defaultValue = "0",description = "明细合计|所有明细合计")
    private Double orderAmount;
    @FieldMeta(name = "preferential_amount",type = FieldType.DOUBLE,defaultValue = "0",description = "优惠金额|会员级别折扣优惠")
    private Double preferentialAmount;
    @FieldMeta(name = "other_amount",type = FieldType.DOUBLE,defaultValue = "0",description = "其他金额|自定义金额或优惠 正或者负")
    private Double otherAmount;
    @FieldMeta(name = "member_day_amount",type = FieldType.DOUBLE,defaultValue = "0",description = "会员日金额|会员日优惠金额 负数")
    private Double memberDayAmount;

    @FieldMeta(name="pay_type",type= FieldType.STRING,description="付款类型",dictOption = "0:余额,A:支付宝,B:微信,C:银联,D:现金")
    private String payType;
    @FieldMeta(name="pay_oper",type= FieldType.STRING,description="付款操作",dictOption = "Y:创建赊账")
    private String[] payOper;
    @FieldMeta(name = "pay_amount",type = FieldType.DOUBLE,defaultValue = "0",description = "实付金额|orderAmount-preferentialAmount+otherAmount+memberDayAmount")
    private Double payAmount;
    @FieldMeta(name = "pay_real_money",type = FieldType.DOUBLE,defaultValue = "0",description = "付款实际金额")
    private Double payRealMoney;
    @FieldMeta(name = "pay_give_money",type = FieldType.DOUBLE,defaultValue = "0",description = "付款赠送金额")
    private Double payGiveMoney;

    @FieldMeta(name="remark",type= FieldType.STRING,length=500,description="备注")
    private String remark;

    @FieldMeta(name="input_date",type=FieldType.DATE,defaultValue = "CURRENT_TIMESTAMP",description="录入时间")
    private Date inputDate;
    @LinkTableMeta(name="serve_admin_oid",table= AdminLogin.class,description="服务员")
    private AdminLogin serveAdmin;
    @LinkTableMeta(name="input_admin_oid",table= AdminLogin.class,description="录入人")
    private AdminLogin inputAdmin;
    @LinkTableMeta(name="input_dept_oid",table= OrgGroupView.class,description="录入部门")
    private OrgGroupView inputDept;
    @FieldMeta(name="status",type= FieldType.STRING,description="状态",defaultValue = "N",dictOption = "Y:已确认,N:待确认,A:暂存")
    private String status;
    @LinkTableMeta(name="confirm_admin_oid",table= AdminLogin.class,description="确认人")
    private AdminLogin confirmAdmin;
    @FieldMeta(name="confirm_date",type=FieldType.DATE,description="确认时间")
    private Date confirmDate;

    public String[] getPayOper() {
        return payOper;
    }

    public void setPayOper(String[] payOper) {
        this.payOper = payOper;
    }

    public AdminLogin getServeAdmin() {
        return serveAdmin;
    }

    public void setServeAdmin(AdminLogin serveAdmin) {
        this.serveAdmin = serveAdmin;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public MemberInfo getMember() {
        return member;
    }

    public void setMember(MemberInfo member) {
        this.member = member;
    }

    public Double getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(Double orderAmount) {
        this.orderAmount = orderAmount;
    }

    public Double getPreferentialAmount() {
        return preferentialAmount;
    }

    public void setPreferentialAmount(Double preferentialAmount) {
        this.preferentialAmount = preferentialAmount;
    }

    public Double getOtherAmount() {
        return otherAmount;
    }

    public void setOtherAmount(Double otherAmount) {
        this.otherAmount = otherAmount;
    }

    public Double getMemberDayAmount() {
        return memberDayAmount;
    }

    public void setMemberDayAmount(Double memberDayAmount) {
        this.memberDayAmount = memberDayAmount;
    }

    public Double getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(Double payAmount) {
        this.payAmount = payAmount;
    }

    public Double getPayRealMoney() {
        return payRealMoney;
    }

    public void setPayRealMoney(Double payRealMoney) {
        this.payRealMoney = payRealMoney;
    }

    public Double getPayGiveMoney() {
        return payGiveMoney;
    }

    public void setPayGiveMoney(Double payGiveMoney) {
        this.payGiveMoney = payGiveMoney;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getInputDate() {
        return inputDate;
    }

    public void setInputDate(Date inputDate) {
        this.inputDate = inputDate;
    }

    public AdminLogin getInputAdmin() {
        return inputAdmin;
    }

    public void setInputAdmin(AdminLogin inputAdmin) {
        this.inputAdmin = inputAdmin;
    }

    public OrgGroupView getInputDept() {
        return inputDept;
    }

    public void setInputDept(OrgGroupView inputDept) {
        this.inputDept = inputDept;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public AdminLogin getConfirmAdmin() {
        return confirmAdmin;
    }

    public void setConfirmAdmin(AdminLogin confirmAdmin) {
        this.confirmAdmin = confirmAdmin;
    }

    public Date getConfirmDate() {
        return confirmDate;
    }

    public void setConfirmDate(Date confirmDate) {
        this.confirmDate = confirmDate;
    }
}
